﻿@model ESupervision.Models.Document

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>
<style>
    textarea {
        max-width: 60%;
    }
</style>

@using (Html.BeginForm("Create", "Document", null, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    <div class="form-horizontal">
        <h4>Document</h4>
        <hr />
        @Html.ValidationSummary(true)
        <div class="well bs-component">
            <div class="form-group">
                @Html.LabelFor(model => model.Subject, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextAreaFor(model => model.Subject, new { @cols = 200, @rows = 10 })
                    @*@Html.EditorFor(model => model.Subject)*@
                    @Html.ValidationMessageFor(model => model.Subject)
                    @Html.HiddenFor(model => model.CreatedByUserId)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Body, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextAreaFor(model => model.Body, new { @cols = 200, @rows = 10 })
                    @*@Html.EditorFor(model => model.Body)*@
                    @Html.ValidationMessageFor(model => model.Body)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.AttachmentFileID, "AttachmentFileID", new { @class = "control-label col-md-2" })
                @Html.ValidationMessageFor(model => model.AttachmentFileID)
                <div class="col-md-10">
                    <input type="file" id="Attachment" name="upload" />
                </div>
            </div>

            <div class="form-group" style="margin-left:36%">
                <div class="col-md-offset-2 col-md-10">
                    <button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-plus">CreatNew</span></button>
                    @Html.ActionLink("BacktoList", "Index", "Document", null, new { @class = "btn btn-success  glyphicon glyphicon-repeat " })
                </div>
            </div>
        </div>

    </div>
}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
